﻿using System;
using com.fukefu.source;

namespace com.fukefu.info.bbs
{
    public class Discuz : Information
    {
        public override bool Login(string name, string pass, string vcode)
        {
            ParametersData pd = new ParametersData();
            pd.Add("fastloginfield", "username");
            pd.Add("username", name);
            pd.Add("password", pass);
            pd.Add("quickforward", "yes");
            pd.Add("handlekey", "ls");
            string html = source.Post("http://bbs.admin5.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1", pd.Read());
            if (html.IndexOf("现在将转入登录前页面") != -1)
            {
                return true;
            }
            return false;
        }

        public override InformationResult PostArticle(string title, string content, string vcode)
        {
            throw new NotImplementedException();
        }
    }
}
